package cn.yj.alipay;

import cn.yj.alipay.config.AliPayConfig;
import cn.yj.alipay.service.handler.AppAlipay;
import cn.yj.alipay.service.handler.H5Alipay;
import cn.yj.alipay.service.handler.PcAlipay;
import cn.yj.alipay.wrapper.AliPayFromExecutorExecutor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;

/**
 * @author 永健
 * @since 2022-01-21 16:16
 */
@Conditional(value = EnableAliPayCondition.class)
public class AliPayAutoConfig {

    @Bean
    public AliPayConfig aliPayConfig() {
        return new AliPayConfig();
    }

    @Bean
    public AliPayFromExecutorExecutor aliPayFromExecutorExecutor() {
        return new AliPayFromExecutorExecutor();
    }

    @Bean
    public AppAlipay appPay() {
        return new AppAlipay();
    }

    @Bean
    public H5Alipay h5Pay() {
        return new H5Alipay();
    }

    @Bean
    public PcAlipay jsapiPay() {
        return new PcAlipay();
    }

}
